home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
NEWSOFT
/
SEPTEMBER
/
BLACKHOLE
/
!ToolBar
/
!Help
< prev
next >
Wrap
Text File
|
1995-05-15
|
9KB
|
190 lines
A Desktop Tool Bar
==================
So what does it do then?
------------------------
Many applications (e.g. Draw) have a tool bar - a small window containing icons
which perform some action (e.g. Select Mode, Text Mode etc.) when clicked on.
Wouldn't it be nice if all applications could have this? Well now they can.
ToolBar provides this facility in a 'Smart' fashion. It is user-configurable
(see later) and will provide a tool bar relevant to whichever application
currently has the caret. The tool bar will change if the owner of the caret
changes. And it's fully compatible with !Help. What more could you ask?
Don't answer that. It's not THAT powerful.
Running ToolBar installs an icon on the iconbar. Clicking SELECT over this icon
opens the ToolBar window, the title bar of which will display which application
it is currently showing tools for. If no window currently has the caret, then
ToolBar will use its 'Desktop' icons, which have the same functions as the F12
key (i.e. command line, bring iconbar to front, task window, and shutdown). If
the application which owns the caret is not known to ToolBar, then it will
display its 'Global' icons - icons which correspond to almost all applications,
i.e save,find,cut,copy,paste. These should work with most applications, but
there may be cases when the outcome is unpredictable. Don't blame me if your
wordprocessor attempts to make potato pie every time you click on Tool Bar.
I think this scenario is very unlikely, however.
Go on, tell us how it works.
----------------------------
It's dead simple. When you click on an icon, ToolBar issues forth a command
equivalent to the 'Hot Key' for that command. E.g. if you click on the 'Save'
icon, ToolBar will 'press' F3, which for most applications pops up a 'Save As'
box. Similarly, 'Find' is F4, cut is ^X, copy is ^C, and paste is ^V.
So, how do you configure it?
----------------------------
Obviously, ToolBar can only be configured to issue commands when there is a
'Hot Key' for that command. To set up ToolBar so that it knows about an
application, you have to edit the file 'Keys' contained inside !ToolBar (use
!Edit or similar). The format is as follows:
<Appname>
sprite,key
Helptext
sprite1,key1
Helptext1
Stop
<Appname>
etc.
Stop
End
where <Appname> is replaced by the name of the application as it appears in the
Task Manager window. You should replace 'sprite' with the name of a sprite to
use for the button. The sprites are contained in the file 'Tools' and you can
either use one of these or define your own. If you define your own, make sure
you save it in the 'Tools' file. Helptext is a line of text which will
be passed to the interactive Help (!Help) application if it is running when the
pointer is over the icon. The message should be short and informative. The
program will prefix whatever you put with 'Click SELECT to '.
The key definition has a strict order:
Shift-Ctrl is specified as ⇧^ (use!Chars to get the arrow)
Function keys start with F
Shift is specified as ⇧
Ctrl is specified as ^
You can only specify Shift-Ctrl in conjunction with a function key or 'Special
Key' (e.g. Print, Page Up, etc). For special keys, you must enter them using
the same case as appears on the key - e.g. Page Down MUST have the initial
capital letters - 'page Down', 'PAGE DOWN' etc. are unacceptable.
So, to specify Shift-F3 you would write ⇧F3
To specify Ctrl-X you would write ^X. The letter must be capitalised (i.e
^x will not do.)
Note that you do not need to specify 'Hot keys' - any ASCII character can be
specified - eg open quotes, accented characters, etc.
If the program encounters a key definition which it cannot understand, that
definition will be ignored.
Stop MUST ALWAYS BE FOLLOWED BY A BLANK LINE!!!!!
There must be NO OTHER SPACES OR BLANK LINES in the file and it
MUST END WITH End.
The first two definitions (Desktop and Global) should not be removed or have
anything put in front of them unless you want different defaults.
Currently you can define up to 21 keys for up to 11 different applications.
If there are more than 11 applications defined, the surplus will be ignored. Too
many key definitions will cause a fatal error.
The Icon Bar Menu.
------------------
Also accessible with 'Menu' over the ToolBar window.
Four entries : Info and Quit are the usual.
Follow Caret allows you to stop ToolBar changing whenever the caret moves.
Moving right off Applications presents a list of all currently known
applications. Selecting one will cause the ToolBar window to change to that
set of icons, and Follow Caret will be turned off.
© Fat German Productions 1993
Disclaimer:
===========
This program is supplied 'as is' with no guarantee of its suitability for any
purpose. I will not be held responsible for it or anything that may happen due
to its use or misuse. 'Use' in this instance is defined as running the software,
this being accomplished by the accepted method of double-clicking, meaning
pressing the left mouse button twice in succession over the program's icon or
the icon for its !Run file so as to begin the process of copying the program
from the permanent storage medium on which it is kept into the temporary
storage provided by the random access memory of the computer and thereby
causing the computer to begin to execute the instructions contained within the
part of the program known as the filling which is covered by the topping and
then the custard.
Running the program is taken to be acceptance of this condition. No other
conditions will be imposed on any users, subject to the condition that their
computing equipment is in a suitable condition to properly run the software,
which has been conditionally tested under a variety of conditions to ensure that
it does not crash on any condition. Or something like that.
This software is perfect. There is nothing whatsoever wrong with it. Any
additional features not documented in this file are purely the product of a
deranged mind and I would recommend that you see a psychiatrist. Also talk to
him and make sure he can see you, otherwise he'll think he's gone mad.
Or something.
-----------------------------------------------------------------------------
Public Domain Notice:
=====================
Tool Bar is phase 2 of Fat German Productions' plan for world domination. Phase
1 was Black Hole 2, which was brilliant and perfect. Phase 3 has yet to be
finalised but will probably involve annexing a small area of memory.
This software is released by assent of the Fat German and the Great Green
Gollywog. His minions would have nothing to do with this, as they complained it
wasn't violent enough. It may be freely copied and used, as long as the
following conditions are met:
a) That this notice is distributed unchanged with every copy.
b) That the application is supplied with unchanged versions of all files.
(If you design any nice new sprites or set up any new applications
definitions, let me know and I'll include them in future releases.)
c) No charge is made for the distribution. Public domain libraries may make
a small charge to cover distribution costs. It is highly unethical, not
to mention dishonest to make a charge for software which programmers
have intended to be freely distributed, especially if none of that profit
finds its way to the programmer.
d) Everybody gets down and boogies.
All copyright is reserved. You may not use any part of this application in
any project which is to be sold for profit without my express permission
in writing.
If you wish to use pieces of my code in your own pd programs then please feel
free to do so, provided these programs are not intented for sale.
I say this mainly because my telling you not to do so would not stop you, but
also becasue I learned programming by nicking and splicing bits of other
people's programs, so why shouldn't you?
If you do use my code, a credit would be nice. Money would be even better.
If anybody out there feels like designing some really pretty icons for the
tools, I'd be only too glad to include them in future releases. Full credit
will be given. (My artistic talent is confined to beautifully written BASIC,
though this is by choice and does not mean I can't draw. I could do it if I
tried. Wibble.)
© 1993 Mark Greenwood (aka Fat German)
Fat German Productions,
122 Miswell Lane,
Tring,
Herts. HP23 4EU
England
email : mgreenwo@madge.com